import request from '@/utils/request'

/**
 * 获取树形权限
 * @param params 
 * @returns 
 */
export const getTreePermission = (params?: any) => {
    return request.get({ url: '/adminapi/system.auth.Permission/tree', params })
}


export const getTreeAll = (params?: any) => {
    return request.get({ url: '/adminapi/system.auth.Permission/treeAll', params })
}



export const getPermission = (params?: any) => {
    return request.get({ url: '/adminapi/system.auth.Permission/lists', params })
}


/**
 * 保存权限
 * @param params 
 * @returns 
 */
export const savePermission = (params?: any) => {
    return request.post({ url: '/adminapi/system.auth.Permission/save', data: params })
}

/**
 * 删除权限
 * @param params 
 * @returns 
 */
export const deletePermission = (params?: any) => {
    return request.post({ url: '/adminapi/system.auth.Permission/delete', data: params })
}


/**
 * 更新权限
 * @param params 
 * @returns 
 */
export const updatePermission = (data?: any) => {
    return request.put({ url: '/adminapi/system.auth.Permission/update', data })
}



